<?php

/**
 * Template for one link to tag
 * and counter value for a tag
 *
 * These links appears inside 'recent tags' block
 * The 'type' on vars cold be 'tagged'
 * or 'unanswered/tagged' for links
 * to unanswered tags
 * 
 */
class tplLinktag extends StudyBuddy\Template\Template
{
	/**
	 * This is important!
	 * Since tags can be any combination of cars, even
	 * brackets and + sign, we should always urlencode tag's value
	 * for the link!
	 * 
	 * @param array $a
	 */
	protected static function func(&$a){
		$a['encoded'] = urlencode($a['tag']);
	}
	
	protected static $vars = array(
	'tag' => '', 
	'i_count' => '',
	'encoded' => ''
	);

	protected static $tpl = '<li>
								<a href="/tagged/%3$s/" title="Questions tagged \'%1$s\'">
									<span class="tag-left"></span>
									<span class="tag-mid">%1$s</span>
									<span class="tag-right"></span>
								</a>
							</li>';

}